<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>sock: E:/git/sock/sock/net/tcp_worker.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">sock
   &#160;<span id="projectnumber">v0.11</span>
   </div>
   <div id="projectbrief">C++ Network Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_99ede9081e3122cb31ab1bd7b142cd6c.html">sock</a></li><li class="navelem"><a class="el" href="dir_7c33e989e8c050d7b2ba91a16c41033d.html">sock</a></li><li class="navelem"><a class="el" href="dir_d903d5916af6fe48bd2085e947d1c878.html">net</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">tcp_worker.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="tcp__worker_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Name         : tcp_worker.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Author       : 671643387</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Date         : 2015年10月6日</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Description  :</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef SOCK_NET_TCP_WORKER_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define SOCK_NET_TCP_WORKER_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;boost/shared_ptr.hpp&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="thread_8h.html">sock/base/thread.h</a>&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="event__loop_8h.html">sock/net/event_loop.h</a>&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="tcp__connection_8h.html">sock/net/tcp_connection.h</a>&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacesock.html">sock</a></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keyword">namespace </span>net</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    {</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keyword">class </span>TcpServer;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_tcp_worker.html">   25</a></span>&#160;        <span class="keyword">class </span><a class="code" href="classsock_1_1net_1_1_tcp_worker.html">TcpWorker</a> : <span class="keyword">public</span> <a class="code" href="classsock_1_1base_1_1_thread.html">base::Thread</a></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_tcp_worker.html#a35fba23c2a4971863c4150ed247fe96e">   28</a></span>&#160;            <span class="keyword">typedef</span> boost::function&lt;void(TcpConnection*)&gt; <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a35fba23c2a4971863c4150ed247fe96e">PassTcpConnectionPointerFunc</a>;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">   33</a></span>&#160;            <span class="keyword">struct </span><a class="code" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            {</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a3eb0feb98fd3b967d6a5693ff90952a5">   35</a></span>&#160;                <span class="keywordtype">int</span> <a class="code" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a3eb0feb98fd3b967d6a5693ff90952a5">connectionLoad</a>;                     <span class="comment">/* 工作线程持有的连接数 */</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a165e729d729b20c788df8a911b1cbcfa">   36</a></span>&#160;                <a class="code" href="structsock_1_1net_1_1_event_loop_1_1_statics.html">EventLoop::Statics</a> <a class="code" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a165e729d729b20c788df8a911b1cbcfa">eventLoopStatics</a>;    <span class="comment">/* 事件循环状态 */</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            };</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a8593b752fabd3539ba8f14c36488bf8e">TcpWorker</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            <span class="keyword">virtual</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a50fb91b5ec83bc8d0afa55f10d01ec72">~TcpWorker</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#ac8ff72964ca27b1218484530322b2531">stop</a>(<span class="keywordtype">void</span>);        <span class="comment">/* @override */</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#ac109fdb1e156de25c7d120d7af0c2ab8">run</a>(<span class="keywordtype">void</span>);         <span class="comment">/* @override */</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a297a303782cda8befae4bf96c4f9bddf">bindConnection</a>(<a class="code" href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">TcpConnectionPtr</a>&amp; conn);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#af1c75330f7b70da0f4ad7e1d282eed05">closeConnection</a>(<a class="code" href="classsock_1_1net_1_1_tcp_connection.html">TcpConnection</a>* conn);</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_tcp_worker.html#a0fcdb4fe410e074266a7de6021ad7b78">   62</a></span>&#160;            <span class="keywordtype">int</span> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a0fcdb4fe410e074266a7de6021ad7b78">getLoad</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> connLoad_; }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_tcp_worker.html#a029d169a58cfc41b29efaee972f41980">   68</a></span>&#160;            <a class="code" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a> <a class="code" href="classsock_1_1net_1_1_tcp_worker.html#a029d169a58cfc41b29efaee972f41980">getStatics</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                <a class="code" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a> statics = { connLoad_ , eventLoop_.<a class="code" href="classsock_1_1net_1_1_event_loop.html#a4f46094758e91bfc921609f5c9c70100">getStatics</a>()};</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                <span class="keywordflow">return</span> statics;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_tcp_worker.html#a3ecf3132e8c4bf890c07853cfab7619c">   75</a></span>&#160;            <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsock_1_1net_1_1_tcp_server.html">TcpServer</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            <span class="keywordtype">void</span> setConnectionClosedFN(PassTcpConnectionPointerFunc fn)</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                connClosedFn_ = fn; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordtype">void</span> setBindConnectionResultFN(boost::function&lt;<span class="keywordtype">void</span>(<a class="code" href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">TcpConnectionPtr</a>&amp;, <span class="keywordtype">bool</span>)&gt; fn)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                bindConnResultFn_ = fn;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;            EventLoop&amp; getLoop(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> eventLoop_; }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="keywordtype">void</span> doBindConnection(<a class="code" href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">TcpConnectionPtr</a>&amp; conn);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            <span class="keywordtype">void</span> doCloseConnection(TcpConnection* conn);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            <span class="keywordtype">int</span> connLoad_;                                  <span class="comment">/* 工作线程管理的连接数 */</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            EventLoop eventLoop_;                           <span class="comment">/* 事件循环 */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            PassTcpConnectionPointerFunc connClosedFn_;     <span class="comment">/* 连接关闭回调 */</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            boost::function&lt;void(TcpConnectionPtr&amp;, bool)&gt; bindConnResultFn_;      <span class="comment">/* 连接绑定失败回调 */</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        };</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="namespacesock_1_1net.html#a95e476b04cd87ff8ab5a596970cc9bc3">   96</a></span>&#160;        <span class="keyword">typedef</span> boost::shared_ptr&lt;TcpWorker&gt; <a class="code" href="namespacesock_1_1net.html#a95e476b04cd87ff8ab5a596970cc9bc3">TcpWorkerPtr</a>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SOCK_NET_TCP_WORKER_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a50fb91b5ec83bc8d0afa55f10d01ec72"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a50fb91b5ec83bc8d0afa55f10d01ec72">sock::net::TcpWorker::~TcpWorker</a></div><div class="ttdeci">virtual ~TcpWorker(void)</div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:19</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_ac109fdb1e156de25c7d120d7af0c2ab8"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#ac109fdb1e156de25c7d120d7af0c2ab8">sock::net::TcpWorker::run</a></div><div class="ttdeci">virtual void run(void)</div><div class="ttdoc">线程执行函数 </div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:29</div></div>
<div class="ttc" id="structsock_1_1net_1_1_event_loop_1_1_statics_html"><div class="ttname"><a href="structsock_1_1net_1_1_event_loop_1_1_statics.html">sock::net::EventLoop::Statics</a></div><div class="ttdoc">状态 </div><div class="ttdef"><b>Definition:</b> event_loop.h:42</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a35fba23c2a4971863c4150ed247fe96e"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a35fba23c2a4971863c4150ed247fe96e">sock::net::TcpWorker::PassTcpConnectionPointerFunc</a></div><div class="ttdeci">boost::function&lt; void(TcpConnection *)&gt; PassTcpConnectionPointerFunc</div><div class="ttdef"><b>Definition:</b> tcp_worker.h:28</div></div>
<div class="ttc" id="namespacesock_1_1net_html_a95e476b04cd87ff8ab5a596970cc9bc3"><div class="ttname"><a href="namespacesock_1_1net.html#a95e476b04cd87ff8ab5a596970cc9bc3">sock::net::TcpWorkerPtr</a></div><div class="ttdeci">boost::shared_ptr&lt; TcpWorker &gt; TcpWorkerPtr</div><div class="ttdef"><b>Definition:</b> tcp_worker.h:96</div></div>
<div class="ttc" id="tcp__connection_8h_html"><div class="ttname"><a href="tcp__connection_8h.html">tcp_connection.h</a></div></div>
<div class="ttc" id="namespacesock_1_1net_html_ac7ab8c7fe4e8e023f2fea799b74122ed"><div class="ttname"><a href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">sock::net::TcpConnectionPtr</a></div><div class="ttdeci">boost::shared_ptr&lt; TcpConnection &gt; TcpConnectionPtr</div><div class="ttdef"><b>Definition:</b> tcp_connection.h:158</div></div>
<div class="ttc" id="structsock_1_1net_1_1_tcp_worker_1_1_statics_html_a3eb0feb98fd3b967d6a5693ff90952a5"><div class="ttname"><a href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a3eb0feb98fd3b967d6a5693ff90952a5">sock::net::TcpWorker::Statics::connectionLoad</a></div><div class="ttdeci">int connectionLoad</div><div class="ttdef"><b>Definition:</b> tcp_worker.h:35</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a0fcdb4fe410e074266a7de6021ad7b78"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a0fcdb4fe410e074266a7de6021ad7b78">sock::net::TcpWorker::getLoad</a></div><div class="ttdeci">int getLoad(void)</div><div class="ttdoc">获取工作线程管理的连接数 </div><div class="ttdef"><b>Definition:</b> tcp_worker.h:62</div></div>
<div class="ttc" id="thread_8h_html"><div class="ttname"><a href="thread_8h.html">thread.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a8593b752fabd3539ba8f14c36488bf8e"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a8593b752fabd3539ba8f14c36488bf8e">sock::net::TcpWorker::TcpWorker</a></div><div class="ttdeci">TcpWorker(void)</div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:12</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html">sock::net::TcpWorker</a></div><div class="ttdef"><b>Definition:</b> tcp_worker.h:25</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_connection_html"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_connection.html">sock::net::TcpConnection</a></div><div class="ttdoc">网络连接 </div><div class="ttdef"><b>Definition:</b> tcp_connection.h:27</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_af1c75330f7b70da0f4ad7e1d282eed05"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#af1c75330f7b70da0f4ad7e1d282eed05">sock::net::TcpWorker::closeConnection</a></div><div class="ttdeci">void closeConnection(TcpConnection *conn)</div><div class="ttdoc">关闭连接 </div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:57</div></div>
<div class="ttc" id="event__loop_8h_html"><div class="ttname"><a href="event__loop_8h.html">event_loop.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a297a303782cda8befae4bf96c4f9bddf"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a297a303782cda8befae4bf96c4f9bddf">sock::net::TcpWorker::bindConnection</a></div><div class="ttdeci">void bindConnection(TcpConnectionPtr &amp;conn)</div><div class="ttdoc">绑定连接到工作线程 </div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:34</div></div>
<div class="ttc" id="namespacesock_html"><div class="ttname"><a href="namespacesock.html">sock</a></div><div class="ttdef"><b>Definition:</b> atomic.h:17</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_server_html"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_server.html">sock::net::TcpServer</a></div><div class="ttdef"><b>Definition:</b> tcp_server.h:29</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_a029d169a58cfc41b29efaee972f41980"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#a029d169a58cfc41b29efaee972f41980">sock::net::TcpWorker::getStatics</a></div><div class="ttdeci">Statics getStatics(void)</div><div class="ttdoc">获取服务器状态 </div><div class="ttdef"><b>Definition:</b> tcp_worker.h:68</div></div>
<div class="ttc" id="structsock_1_1net_1_1_tcp_worker_1_1_statics_html"><div class="ttname"><a href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">sock::net::TcpWorker::Statics</a></div><div class="ttdoc">状态信息 </div><div class="ttdef"><b>Definition:</b> tcp_worker.h:33</div></div>
<div class="ttc" id="classsock_1_1net_1_1_event_loop_html_a4f46094758e91bfc921609f5c9c70100"><div class="ttname"><a href="classsock_1_1net_1_1_event_loop.html#a4f46094758e91bfc921609f5c9c70100">sock::net::EventLoop::getStatics</a></div><div class="ttdeci">Statics getStatics(void)</div><div class="ttdoc">获取循环状态 </div><div class="ttdef"><b>Definition:</b> event_loop.h:75</div></div>
<div class="ttc" id="structsock_1_1net_1_1_tcp_worker_1_1_statics_html_a165e729d729b20c788df8a911b1cbcfa"><div class="ttname"><a href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#a165e729d729b20c788df8a911b1cbcfa">sock::net::TcpWorker::Statics::eventLoopStatics</a></div><div class="ttdeci">EventLoop::Statics eventLoopStatics</div><div class="ttdef"><b>Definition:</b> tcp_worker.h:36</div></div>
<div class="ttc" id="classsock_1_1base_1_1_thread_html"><div class="ttname"><a href="classsock_1_1base_1_1_thread.html">sock::base::Thread</a></div><div class="ttdoc">线程类 </div><div class="ttdef"><b>Definition:</b> thread.h:27</div></div>
<div class="ttc" id="classsock_1_1net_1_1_tcp_worker_html_ac8ff72964ca27b1218484530322b2531"><div class="ttname"><a href="classsock_1_1net_1_1_tcp_worker.html#ac8ff72964ca27b1218484530322b2531">sock::net::TcpWorker::stop</a></div><div class="ttdeci">virtual void stop(void)</div><div class="ttdoc">停止线程 </div><div class="ttdef"><b>Definition:</b> tcp_worker.cc:24</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
